<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>整数</title>
		<script>
			var n=prompt("请输入一个字符串：");
			alert(isNaN(n));
			if(isNaN(n)){
				alert("转换不了");
			}else{
				var i=parseInt(n);
				alert(i);
			}
			
		</script>
	</head>
	<body>
	</body>
</html>